import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { MessageModule } from './module/message/message.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import { GatewayModule } from './module/gateway/gateway.module';

@Module({
  imports: [
    MessageModule,
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: '47.116.218.228',
      port: 3306,
      username: 'admin',
      password: '123456',
      database: 'chat_room',
      entities: [],
      synchronize: false,
      autoLoadEntities: true,
    }),
    GatewayModule,
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
